<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>DesktopMouseX</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">DesktopMouseX()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#006666"><b>DesktopMouseX</b></font>()</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Returns the absolute x position of the mouse on the desktop. 

 

</blockquote><p><b>参数</b></p><blockquote>
无.


</blockquote><p><b>返回值</b></p><blockquote>



Returns the x coordinate (in pixel) of the mouse relative to the top left corner of the primary monitor. 
The coordinate is negative if the mouse is on a monitor to the left of the primary monitor. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">If</font></b> <font color="#006666">OpenWindow</font>(0, 0, 0, 300, 30, "Desktop mouse monitor", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#006666">    TextGadget</font>(0, 10, 6, 200, 20, "")

    <b><font color="#006666">Repeat</font></b>
      Event =<font color="#006666"> WindowEvent</font>()

      <b><font color="#006666">If</font></b> Event = 0 <font color="#006666">; No events are in queue anymore, so halt the process for a few milliseconds for multitasking</font>
<font color="#006666">        SetGadgetText</font>(0, "Desktop mouse position: "+<font color="#006666">Str</font>(<font color="#006666">DesktopMouseX</font>())+","+<font color="#006666">Str</font>(<font color="#006666">DesktopMouseY</font>()))
<font color="#006666">        Delay</font>(20)
      <b><font color="#006666">EndIf</font></b>

    <b><font color="#006666">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="desktopmousey.html">DesktopMouseY()</a>, <a href="desktopx.html">DesktopX()</a>, <a href="desktopwidth.html">DesktopWidth()</a>, <a href="../window/windowmousex.html">WindowMouseX()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=desktopheight.html>DesktopHeight()</a> - <a href=index.html>Desktop Index</a> - <a href=desktopmousey.html>DesktopMouseY()</a> -&gt;



</body></html>